package com.jt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import java.io.Serializable;
@Component
@Data//get/set方法
@TableName("demo_user")//映射表
@Accessors(chain = true)//链式加载
//规定：POJO实体一般都需要实现序列号接口
public class User implements Serializable {
    @TableId(type = IdType.AUTO)//主键自增
    private Integer id;
    private String name;
    private String sex;
    private Integer age;
}
